home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Module Com22378772001.psc / frmbuildwordlist.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-06-28  |  10.8 KB  |  369 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form frmbuildwordlist 
  4.    Caption         =   "Build Word List"
  5.    ClientHeight    =   6975
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6705
  9.    Icon            =   "frmbuildwordlist.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   6975
  12.    ScaleWidth      =   6705
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin VB.ListBox lstGo 
  15.       Height          =   1860
  16.       Left            =   75
  17.       Sorted          =   -1  'True
  18.       Style           =   1  'Checkbox
  19.       TabIndex        =   9
  20.       Top             =   4695
  21.       Width           =   6555
  22.    End
  23.    Begin VB.CommandButton cmdExit 
  24.       Caption         =   "Exit"
  25.       Height          =   315
  26.       Left            =   5085
  27.       TabIndex        =   5
  28.       Top             =   465
  29.       Width           =   1515
  30.    End
  31.    Begin VB.ListBox lstShow 
  32.       Height          =   1860
  33.       ItemData        =   "frmbuildwordlist.frx":0E42
  34.       Left            =   75
  35.       List            =   "frmbuildwordlist.frx":0E44
  36.       Sorted          =   -1  'True
  37.       Style           =   1  'Checkbox
  38.       TabIndex        =   4
  39.       Top             =   2445
  40.       Width           =   6555
  41.    End
  42.    Begin VB.Frame Frame1 
  43.       Height          =   1350
  44.       Left            =   75
  45.       TabIndex        =   3
  46.       Top             =   810
  47.       Width           =   6555
  48.       Begin MSComctlLib.ProgressBar cpb 
  49.          Height          =   225
  50.          Left            =   255
  51.          TabIndex        =   13
  52.          Top             =   405
  53.          Visible         =   0   'False
  54.          Width           =   4530
  55.          _ExtentX        =   7990
  56.          _ExtentY        =   397
  57.          _Version        =   393216
  58.          BorderStyle     =   1
  59.          Appearance      =   0
  60.          Scrolling       =   1
  61.       End
  62.       Begin VB.CommandButton cmdBuild 
  63.          Caption         =   "Build List"
  64.          Height          =   315
  65.          Left            =   4950
  66.          TabIndex        =   6
  67.          Top             =   945
  68.          Visible         =   0   'False
  69.          Width           =   1515
  70.       End
  71.       Begin MSComctlLib.ProgressBar tpb 
  72.          Height          =   225
  73.          Left            =   255
  74.          TabIndex        =   15
  75.          Top             =   870
  76.          Visible         =   0   'False
  77.          Width           =   4530
  78.          _ExtentX        =   7990
  79.          _ExtentY        =   397
  80.          _Version        =   393216
  81.          BorderStyle     =   1
  82.          Appearance      =   0
  83.          Scrolling       =   1
  84.       End
  85.       Begin VB.Label Label6 
  86.          Caption         =   "Total Progress"
  87.          Height          =   195
  88.          Left            =   1965
  89.          TabIndex        =   16
  90.          Top             =   660
  91.          Visible         =   0   'False
  92.          Width           =   1050
  93.       End
  94.       Begin VB.Label Label5 
  95.          Caption         =   "Current File Progress"
  96.          Height          =   225
  97.          Left            =   1785
  98.          TabIndex        =   14
  99.          Top             =   180
  100.          Visible         =   0   'False
  101.          Width           =   1500
  102.       End
  103.       Begin VB.Label lblaftersearch 
  104.          Caption         =   $"frmbuildwordlist.frx":0E46
  105.          Height          =   465
  106.          Left            =   5430
  107.          TabIndex        =   12
  108.          Top             =   330
  109.          Visible         =   0   'False
  110.          Width           =   750
  111.       End
  112.    End
  113.    Begin VB.CommandButton cmdStartSearch 
  114.       Caption         =   "Start Search"
  115.       Height          =   315
  116.       Left            =   5085
  117.       TabIndex        =   2
  118.       Top             =   90
  119.       Width           =   1515
  120.    End
  121.    Begin VB.TextBox Text1 
  122.       BackColor       =   &H8000000A&
  123.       Enabled         =   0   'False
  124.       Height          =   315
  125.       Left            =   75
  126.       Locked          =   -1  'True
  127.       TabIndex        =   1
  128.       Text            =   "*.txt"
  129.       Top             =   465
  130.       Width           =   4815
  131.    End
  132.    Begin VB.DriveListBox Drive1 
  133.       Height          =   315
  134.       Left            =   75
  135.       TabIndex        =   0
  136.       Top             =   90
  137.       Width           =   4815
  138.    End
  139.    Begin VB.Label Label4 
  140.       Caption         =   "0 file(s) in list"
  141.       Height          =   225
  142.       Left            =   75
  143.       TabIndex        =   11
  144.       Top             =   4470
  145.       Visible         =   0   'False
  146.       Width           =   3510
  147.    End
  148.    Begin VB.Label Label3 
  149.       Caption         =   "lstShow"
  150.       Height          =   225
  151.       Left            =   75
  152.       TabIndex        =   10
  153.       Top             =   2190
  154.       Visible         =   0   'False
  155.       Width           =   3510
  156.    End
  157.    Begin VB.Label Label2 
  158.       Caption         =   "Searching...."
  159.       Height          =   210
  160.       Left            =   4905
  161.       TabIndex        =   8
  162.       Top             =   6750
  163.       Visible         =   0   'False
  164.       Width           =   1710
  165.    End
  166.    Begin VB.Label Label1 
  167.       Height          =   210
  168.       Left            =   75
  169.       TabIndex        =   7
  170.       Top             =   6750
  171.       Width           =   4005
  172.    End
  173.    Begin VB.Menu mnlstShow 
  174.       Caption         =   "lstShow"
  175.       Visible         =   0   'False
  176.       Begin VB.Menu mnShowAddcheckedfilestofinallist 
  177.          Caption         =   "Add checked files to final list"
  178.       End
  179.       Begin VB.Menu mnShowSep1 
  180.          Caption         =   "-"
  181.       End
  182.       Begin VB.Menu mnShowSelectAll 
  183.          Caption         =   "Select All"
  184.       End
  185.       Begin VB.Menu mnShowDeselectall 
  186.          Caption         =   "Deselect All"
  187.       End
  188.       Begin VB.Menu mnShowSep2 
  189.          Caption         =   "-"
  190.       End
  191.       Begin VB.Menu mnShowCancel 
  192.          Caption         =   "Cancel"
  193.       End
  194.    End
  195.    Begin VB.Menu mnlstGo 
  196.       Caption         =   "lstGo"
  197.       Visible         =   0   'False
  198.       Begin VB.Menu mnGoRemovecheckedfilesfromlist 
  199.          Caption         =   "Remove checked files from final list"
  200.       End
  201.       Begin VB.Menu mnGoSep1 
  202.          Caption         =   "-"
  203.       End
  204.       Begin VB.Menu mnGoSelectAll 
  205.          Caption         =   "Select All"
  206.       End
  207.       Begin VB.Menu mnGoDeselectAll 
  208.          Caption         =   "Deselect All"
  209.       End
  210.       Begin VB.Menu mnGoSep2 
  211.          Caption         =   "-"
  212.       End
  213.       Begin VB.Menu mnGoCancel 
  214.          Caption         =   "Cancel"
  215.       End
  216.    End
  217. Attribute VB_Name = "frmbuildwordlist"
  218. Attribute VB_GlobalNameSpace = False
  219. Attribute VB_Creatable = False
  220. Attribute VB_PredeclaredId = True
  221. Attribute VB_Exposed = False
  222. Option Explicit
  223. Public CFiles As New colFiles
  224. Dim lstGoCount As Integer
  225. Dim lstShowCount As Integer
  226. Private Sub startsearch_Click()
  227. End Sub
  228. Private Sub cmdBuild_Click()
  229. Dim temptext As String
  230. Dim linecount As Integer
  231. Dim I As Integer
  232. lblaftersearch.Visible = False
  233. lblaftersearch.Refresh
  234. Frame1.Refresh
  235. Label5.Visible = True
  236. Label6.Visible = True
  237. cpb.Visible = True
  238. tpb.Visible = True
  239. tpb.Value = 0
  240. cpb.Value = 0
  241. Frame1.Refresh
  242. tpb.Max = lstGo.ListCount
  243. 'tpb.Value = 1
  244. For I = 0 To lstGo.ListCount - 1
  245.     Open lstGo.List(I) For Input As #1
  246.         Do Until EOF(1)
  247.             Line Input #1, temptext
  248.             linecount = linecount + 1
  249.         Loop
  250.     Close #1
  251.     cpb.Max = linecount
  252.     Open lstGo.List(I) For Input As #1
  253.         Do Until EOF(1)
  254.             Line Input #1, temptext
  255.             Call parsedata(temptext, "wordlist.txt")
  256.             cpb.Value = cpb.Value + 1
  257.         Loop
  258.         tpb.Value = tpb.Value + 1
  259.         cpb.Value = 0
  260.         linecount = 0
  261.     Close #1
  262. Next I
  263. cpb.Value = cpb.Max
  264. End Sub
  265. Private Sub cmdExit_Click()
  266. Unload Me
  267. End Sub
  268. Private Sub cmdStartSearch_Click()
  269. Dim data As String
  270. Label2.Visible = True
  271. Label2.Refresh
  272. data = Drive1.Drive
  273. cmdStartSearch.Enabled = False
  274. cmdExit.Enabled = False
  275. Me.MousePointer = 11
  276. If InStr(data, " ") Then
  277.     data = Left(data, InStr(data, " ") - 1)
  278. End If
  279. CFiles.Clear
  280. CFiles.LoadFiles data & "\" & Text1.Text, True
  281. Dim l As Long
  282. For l = 1 To CFiles.Count
  283.     lstShow.AddItem CFiles(l).sPath & CFiles(l).sNameAndExtension
  284. Next l
  285. Label1.Caption = "Found " & CFiles.Count & " file(s)"
  286. 'Label1.Caption = FindFile("*.txt", data, Me, lstShow)
  287. Label2.Caption = "Search Complete"
  288. Label3.Visible = True
  289. Label4.Visible = True
  290. lstShowCount = CFiles.Count
  291. Label3.Caption = lstShowCount & " file(s) in list"
  292. Label4.Caption = lstGoCount & " file(s) in list"
  293. With lblaftersearch
  294.     .Visible = True
  295.     .Height = 870
  296.     .Left = 75
  297.     .Top = 180
  298.     .Width = 4758
  299. End With
  300. cmdStartSearch.Enabled = True
  301. cmdExit.Enabled = True
  302. Me.MousePointer = 0
  303. End Sub
  304. Private Sub lstGo_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  305. If Button = 2 Then PopupMenu mnlstGo
  306. End Sub
  307. Private Sub lstShow_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  308. If Button = 2 Then PopupMenu mnlstShow
  309. End Sub
  310. Private Sub mnGoDeselectAll_Click()
  311. Dim I As Integer
  312. For I = 0 To lstGo.ListCount - 1
  313.     lstGo.Selected(I) = False
  314. Next I
  315. End Sub
  316. Private Sub mnGoRemovecheckedfilesfromlist_Click()
  317. Dim I As Integer
  318. Dim K As Integer
  319. For K = 1 To lstGo.SelCount
  320.     For I = 0 To lstGo.ListCount - 1
  321.         If lstGo.Selected(I) = True Then
  322.             lstShow.AddItem lstGo.List(I)
  323.             lstShowCount = lstShowCount + 1
  324.             lstGo.RemoveItem I
  325.             lstGoCount = lstGoCount - 1
  326.             Exit For
  327.         End If
  328.     Next I
  329. Next K
  330. Label3.Caption = lstShowCount & " file(s) in list"
  331. Label4.Caption = lstGoCount & " file(s) in list"
  332. End Sub
  333. Private Sub mnGoSelectAll_Click()
  334. Dim I As Integer
  335. For I = 0 To lstGo.ListCount - 1
  336.     lstGo.Selected(I) = True
  337. Next I
  338. End Sub
  339. Private Sub mnShowAddcheckedfilestofinallist_Click()
  340. Dim I As Integer
  341. Dim K As Integer
  342. For K = 1 To lstShow.SelCount
  343.     For I = 0 To lstShow.ListCount - 1
  344.         If lstShow.Selected(I) = True Then
  345.             lstGo.AddItem lstShow.List(I)
  346.             lstGoCount = lstGoCount + 1
  347.             lstShow.RemoveItem I
  348.             lstShowCount = lstShowCount - 1
  349.             Exit For
  350.         End If
  351.     Next I
  352. Next K
  353. Label3.Caption = lstShowCount & " file(s) in list"
  354. cmdBuild.Visible = True
  355. Label4.Caption = lstGoCount & " file(s) in list"
  356. End Sub
  357. Private Sub mnShowDeselectall_Click()
  358. Dim I As Integer
  359. For I = 0 To lstShow.ListCount - 1
  360.     lstShow.Selected(I) = False
  361. Next I
  362. End Sub
  363. Private Sub mnShowSelectAll_Click()
  364. Dim I As Integer
  365. For I = 0 To lstShow.ListCount - 1
  366.     lstShow.Selected(I) = True
  367. Next I
  368. End Sub
  369.